#! /bin/bash

# 开启webserver
if  [ ! -d "./build" ]; then
    mkdir "build"
fi

if  [ ! -d "./build/web" ]; then
    mkdir -p "build/web"
fi

#if [ -d "./build/web/templates" ]; then
#    rm -rf "./build/web/templates"
#fi

cp -R "./templates" "build/web"

go build -o build/web/webserver web/*.go

./build/web/webserver

